<!-- 学生注册申请 -->
<template>
	<view class="list">
		<!-- <view class="list-head" style="position: fixed;top: 0rpx;left: 0;right: 0;background: #fff;z-index: 9;" v-if="current == 0">
			<u-tabs :list="tabList" :is-scroll="false" :show-bar="false" :current="tabIndex" @change="change">
			</u-tabs>
		</view> -->
		<view class="li flex" v-for="(item,index) in list" :key="index" @click="$navigateTo('../index/index?applyId='+item.applyId)">
			<view class="">
				<view class="li-name">
					<!-- 1 申请中,2审批中,3申请通过,4申请被拒绝 -->
					申请状态 {{item.status == 1?'申请中':item.status == 2?'审批中':item.status == 2?'申请通过':'申请被拒绝'}}
				</view>
				<view class="">
					<!-- /1病假,2事假, 3其他 4 公务来访 5私人来访 -->
					申请原因 {{item.applyName}}
				</view>
				<view class="">
					申请时间 {{item.createTime}}
				</view>
			</view>
		</view>
		<view class="" style="margin: 50rpx;">
			<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				status: 'nomore',
				iconType: 'flower',
				loadText: {
					loadmore: '轻轻上拉',
					loading: '努力加载中',
					nomore: '没有更多了'
				},
				tabList: [{
					name: '当前申请'
				}, {
					name: '历史申请'
				}],
				tabIndex:0,
			}
		},
		props:['list'],
		created() {
			
		},
		methods:{
			change(e) {
				this.tabIndex = e
				if (e == 1) {
					this.historyList2()
				} else {
					this.getlist2()
				}
			},
		}
	}
</script>

<style lang="scss">
	.popup {
		padding: 20rpx;
	}
	textarea {
		width: 400rpx;
		height: 100rpx;
		padding: 20rpx;
		margin-bottom: 20rpx;
		// border: 2rpx solid #ccc;
	}
	.btn {
		padding: 10rpx 0;
		border-top: 2rpx solid #fcfcfc;
		
		view {
			flex: 1;
			text-align: center;
		};
	}
	.list {
		padding: 0 28rpx;
	}
	.li {
		padding: 20rpx;
		margin-top: 20rpx;
		border-radius: 20rpx;
		background-color: white;
		.li-btn {
			color: #fff;
			padding: 10rpx 20rpx;
			border-radius: 20rpx;
			background-color: rgb(0, 151, 255);
		}
	}
	
</style>
